<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10.流程控制-分支结构-if语句-练习3</title>
    <script>
        //判断是否中奖
        //1.弹出输入用户姓名
        // 2.判断是否输入的“刘德华”，若是则执行if里面中奖，若假则执行else里面未中奖
        var yourName = prompt('请输入您的姓名');
        if (yourName === '刘德华') {
            alert('恭喜您中奖5元现金');
        } else {
            alert('很抱歉，您未中奖');
        }
    </script>
</head>

<body>

</body>

</html>